package cn.iocoder.yudao.module.system.dal.mysql.tenantapprovelist;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.system.dal.dataobject.tenantapprovelist.TenantApproveListDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.system.controller.admin.tenantapprovelist.vo.*;

/**
 * 开户申请记录 Mapper
 *
 * @author 数创万维
 */
@Mapper
public interface TenantApproveListMapper extends BaseMapperX<TenantApproveListDO> {

    default PageResult<TenantApproveListDO> selectPage(TenantApproveListPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<TenantApproveListDO>()
                .likeIfPresent(TenantApproveListDO::getCorpName, reqVO.getCorpName())
                .likeIfPresent(TenantApproveListDO::getContactName, reqVO.getContactName())
                .eqIfPresent(TenantApproveListDO::getContactMobile, reqVO.getContactMobile())
                .eqIfPresent(TenantApproveListDO::getAdminUser, reqVO.getAdminUser())
                .eqIfPresent(TenantApproveListDO::getAdminUserPass, reqVO.getAdminUserPass())
                .eqIfPresent(TenantApproveListDO::getCallCostPrice, reqVO.getCallCostPrice())
                .eqIfPresent(TenantApproveListDO::getCallChannel, reqVO.getCallChannel())
                .eqIfPresent(TenantApproveListDO::getAccountNum, reqVO.getAccountNum())
                .eqIfPresent(TenantApproveListDO::getAgentNum, reqVO.getAgentNum())
                .eqIfPresent(TenantApproveListDO::getSpeech, reqVO.getSpeech())
                .eqIfPresent(TenantApproveListDO::getRemark, reqVO.getRemark())
                .eqIfPresent(TenantApproveListDO::getCreateTenantId, reqVO.getCreateTenantId())
                .eqIfPresent(TenantApproveListDO::getHandleStatus, reqVO.getHandleStatus())
                .eqIfPresent(TenantApproveListDO::getOperator, reqVO.getOperator())
                .betweenIfPresent(TenantApproveListDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(TenantApproveListDO::getId));
    }

}